package top.mccsdl.Acbot.entity.user;

import java.io.Serializable;

import lombok.Data;

@Data
public class UserInfo implements Serializable {

    private static final long serialVersionUID = 1L;
    private String name;
    private String qq;
    private String lv;
    private String money;
    private String acb;
    private String avatar;//头像 目前频道才有 不做持久化

    /**
     * 用户角色id 2超管 1插件管理 0韭菜
     */
    private String isop; //2超管  1插件管理 0韭菜
    private String pdid; //频道ID
    /**
     * 频道与QQ群的唯一ID -> union_openid
     */
    private String pid; //唯一ID

    public UserInfo(String username, String uuid) {
        this.name = username;
        this.pid = uuid;
        this.isop = "0";
        this.lv = "0";
        this.money = "0";
        this.acb = "0";
    }

    public String getIsop() {
        return isop;
    }

    public void setIsop(String isop) {
        this.isop = isop;
    }

    public String getPdid() {
        return pdid;
    }

    public void setPdid(String pdid) {
        this.pdid = pdid;
    }

    public String getUuid() {
        return pid;
    }

    public void setUuid(String uuid) {
        this.pid = uuid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getLv() {
        return lv;
    }

    public void setLv(String lv) {
        this.lv = lv;
    }

    public String getMoney() {
        return money;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public String getAcb() {
        return acb;
    }

    public void setAcb(String acb) {
        this.acb = acb;
    }

    public String getAvatar() {
        if (qq == null || "".equals(qq)) {
            //没数据默认给个图片
            return "https://xxxxxxxx/logo.jpg";
        }
        return "https://q1.qlogo.cn/g?b=qq&nk=" + qq + "&s=100";
    }

    @Override
    public String toString() {
        return "UserInfo{"
                + "name='" + name + '\''
                + ", qq='" + qq + '\''
                + ", lv='" + lv + '\''
                + ", money='" + money + '\''
                + ", acb='" + acb + '\''
                + ", avatar='" + avatar + '\''
                + ", isop='" + isop + '\''
                + ", pdid='" + pdid + '\''
                + ", uuid='" + pid + '\''
                + '}';
    }
}
